Editor Api
Functions
Adds a new history state to the stack, if undoable changes were made.
Add a new vertex by splitting the segment after the currently selected vector node.
Throws an exception if the device does not support displaying and working in the P3 color space on the current device. If no exception is thrown, the engine can be switched to a P3 color space using the "features/p3WorkingColorSpace" setting.
Converts a color to the given color space.
Create a resizable buffer that can hold arbitrary data.
This is the default implementation for the Uri resolver. If uri is absolute no adjustments are made. If it is relative, it resolves the given Uri relative to the basePath setting, which is "file:///android_asset" by default (assets base uri).
Delete the selected vector control points.
Delete the currently selected vector node from the path.
Destroy a buffer and free its resources.
Destroy the given history, returns an error if the handle doesn't refer to a history.
Returns all media URIs referenced by blocks in the scene. Note: This function retrieves URIs from image fills, video fills, and audio blocks, including their source sets. Only returns valid media URIs (http://, https://, file://), excluding transient resources like buffer URIs. Useful for determining which media files are referenced by a scene (e.g., for cleanup operations, CDN management).
Gets all available global scopes that can be set.
Returns a list of all the settings available.
Queries the names of currently set spot colors previously set with setSpotColor`.
Returns the Uris and sizes of all resources whose data would be lost if the scene was exported. Note: This function is useful for determining which resources need to be relocated (e.g., to a CDN) before exporting a scene since the resources are not included in the exported scene.
Resolves the given uri asynchronously. If a custom resolver has been set with setUriResolver, it uses the custom resolver. Else, it resolves using defaultUriResolver.
Get the handle to the currently active history. If there's none it will be created.
Get the active license of the engine.
Get the currently available memory in bytes.
Get the data of a buffer.
Get the length of a buffer.
Get the current edit mode of the editor. An edit mode defines what type of content can currently be edited by the user.
Returns the font metrics for a given font file URI. If the font is not yet loaded, it will be fetched asynchronously. The returned metrics are in the font's design units coordinate space.
Query the state of a global scope.
Get the export size limit in pixels on the current device. An export is only possible when both the width and height of the output are below or equal this limit. However, this is only an upper limit as the export might also not be possible due to other reasons, e.g., memory constraints.
Returns the mimetype of the resources at the given Uri. If the resource is not already downloaded, this function will download it.
Get when the standalone move handle is shown for the selected block.
Get the effective movement constraint for a block, picking the most specific matching rule: block parent page blockType scene-wide.
Get when the edge (resize) handles are shown for the selected block.
Provides the data of a resource at the given Uri. Note that it is a synchronous function and all the chunks are provided immediately before the function returns.
Get when the rotation handle is shown for the selected block.
Get when the corner (scale) handles are shown for the selected block.
Get the bezier handle mirror mode of the currently selected vector node.
Get a boolean setting.
Get a color setting.
Get an enum setting.
Get all the available options of an enum setting.
Get a float setting.
Get an integer setting.
Get a string setting.
Get the type of a setting.
Queries the RGB representation set for a spot color. If the value of the queried spot color has not been set yet, returns the default RGB representation (of magenta). The alpha value is always 1.0.
Queries the CMYK representation set for a spot color. If the value of the queried spot color has not been set yet, returns the default RGB representation (of magenta).
Queries the RGB representation set for a spot color. If the value of the queried spot color has not been set yet, returns the default RGB representation (of magenta). The alpha value is always 1.0.
Get the current text cursor's x position in screen space.
Get the current text cursor's y position in screen space.
Get the current memory usage of the editor in bytes.
Check whether vector edit add mode is currently active.
Check whether vector edit bend mode is currently active.
Check whether vector edit delete mode is currently active.
Check if there is a selected vector control point.
Check whether a vector anchor node is currently selected in vector edit mode.
Checks wether the block has selection and hover highlighting enabled or disabled.
If an user interaction is happening, e.g., a resize edit with a drag handle or a touch gesture.
Checks whether the block can currently be selected.
Subscribe to current page changes when page carousel mode is enabled. Note: This is only triggered when page carousel mode is enabled (features/pageCarouselEnabled).
Subscribe to changes to the undo/redo history.
Subscribe to changes to the undo/redo history.
Subscribe to changes to the editor role.
Subscribe to changes to the editor settings.
Subscribe to changes to the editor state.
Changes the uri associated with a resource. Note: This function can be used change the Uri of a resource that has been relocated (e.g., to a CDN).
Remove the scene-wide default movement constraint. Removing a scope falls through to the next tier on subsequent resolution.
Remove multiple movement constraint scopes at once. An empty list is a no-op; use removeMovementConstraint with no arguments to remove the scene-wide default.
Remove the movement constraint for a specific scope. Removing a scope falls through to the next tier on subsequent resolution.
Removes a spot color from the list of set spot colors.
Removes the last history state from the stack, if available.
Mark the given history as active, returns an error if the handle doesn't refer to a history. All other histories get cleared from the active state. Undo/redo operations only apply to the active history.
Inform the engine that the app went to the background when paused. When the app is paused, the engine will try to release resources to save memory. The audio output device will be suspended on pause. It starts again automatically as soon as a block is playing or can be started manually with startAudioOutputDevice.
Set the data of a buffer.
Set the length of a buffer.
Set the edit mode of the editor. An edit mode defines what type of content can currently be edited by the user. Note: The initial edit mode is "Transform".
Set the edit mode of the editor using another edit mode as a base. An edit mode defines what type of content can currently be edited by the user.
Set a scope to be globally allowed, denied, or deferred to the block-level.
Enable or disable selection and hover highlighting for a block.
Set when the standalone move handle is shown for the selected block.
Set multiple movement constraint rules at once. See setMovementConstraint for details on a single rule.
Set a rule that limits how far blocks can be positioned outside their parent page during user interactions (drag, resize, touch gestures, crop). Programmatic API calls are not affected.
Set when the edge (resize) handles are shown for the selected block.
Set when the rotation handle is shown for the selected block.
Set when the corner (scale) handles are shown for the selected block.
Set the bezier handle mirror mode for the currently selected vector node.
Enable or disable selection for a block.
Set a boolean setting.
Set a color setting.
Set an enum setting.
Set a float setting.
Set an integer setting.
Set a string setting.
Sets the CMYK representation of a spot color. Use this function to both create a new spot color or update an existing spot color.
Sets the RGB representation of a spot color. Use this function to both create a new spot color or update an existing spot color. Note: The alpha value is ignored.
Sets a custom Uri resolver. This method can be called more than once. Subsequent calls will overwrite previous calls. To remove a previously set resolver, pass the value null. Note: The given function must return an absolute path with a scheme.
Sets a custom async Uri resolver. This method can be called more than once. Subsequent calls will overwrite previous calls. To remove a previously set resolver, pass the value null.
Enable or disable add mode for vector editing.
Enable or disable bend mode for vector editing.
Enable or disable delete mode for vector editing.
Start the audio output device. Usually not needed as the device will automatically start when a block is set to playing. Useful to call when the app is resumed and you want to ensure audio playback is resumed as well. Can also be used to manually start the audio output device, e.g., before a recording.
Returns whether the engine supports displaying and working in the P3 color space on the current device. If supported, the engine can be switched to a P3 color space using the "features/p3WorkingColorSpace" setting.
Toggle the currently selected vector node between smooth (bezier handles) and corner (no handles).